<%-- 
    Document   : List
    Created on : 16-gen-2015, 18.28.55
    Author     : takamflore
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@page import="dao.EventDaoImpl"%>
<%@page language="java" contentType="text/html"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html >

<html>
    <head>
        <title>List of Events</title>
    </head>
    <body>
    <table border="1">
        <thead>
            <tr>
        <th>ID Event</th>
        <th>Name Event</th>
        <th>Date</th>
        <th>Hour</th>
        <th>Addresse</th>
        <th>Description</th>
        <th>Type</th>
        <th>Organizer</th>
        <th>Temperature</th>
        <th>Invited</th>
        <th colspan=2>Action</th>
            </tr>
       </thead>
       <tbody>
        <c:forEach items="${events}" var="event">
            <tr>
                <td><c:out value="${event.Id}"/></td>
                <td><c:out value="${event.nameEvent}"/></td>    
                <td><fmt:formatDate pattern="dd-MM-yyyy" value="${event.dateEvent}"/></td>
                <td><fmt:formatDate pattern="HH:mm:ss" value="${event.hour}"/></td>
                <td><c:out value="${event.addresse}"/></td>
                <td><c:out value="${event.description}"/></td>
                <td><c:out value="${event.type}"/></td>
                <td><c:out value="${event.organizer}"/></td>
                <td><c:out value="${event.temperature}"/></td>
                <td><c:out value="${event.Invited}"/></td>
               <td><a href="DeleteEventServlet?action=edit&eventId=<c:out value="${event.Id}"/>">Update</a></td>
               <td><a href="EventServlet?action=delete&eventId=<c:out value="${event.Id}"/>">Delete</a></td>
            </tr>
        </c:forEach>
       </tbody>
    </table>
    <p><a href="CreateEventServlet?action=Create">Create</a></p>
    </body>
</html>
